<html>
<head><meta charset="utf-8"><title>Enter key in VS Code · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html">Enter key in VS Code</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="194664975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194664975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194664975">(Apr 20 2020 at 12:02)</a>:</h4>
<p>So with issues like <a href="https://github.com/rust-lang/rust/issues/4052" title="https://github.com/rust-lang/rust/issues/4052">#4052</a>, why does this happen? Why is RA blocking Enter keys from following through to the editor?</p>



<a name="194665063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194665063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194665063">(Apr 20 2020 at 12:03)</a>:</h4>
<p>I'm experiencing the same thing today with this week's build and have encountered it in the past as well (for example <a href="https://github.com/rust-lang/rust/issues/3782" title="https://github.com/rust-lang/rust/issues/3782">#3782</a>)</p>



<a name="194665089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194665089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194665089">(Apr 20 2020 at 12:04)</a>:</h4>
<p>and it is incredibly frustrating</p>



<a name="194665549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194665549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194665549">(Apr 20 2020 at 12:09)</a>:</h4>
<p>Rust analyzer tries to for example insert <code>///</code> after pressing enter inside a doc comment.</p>



<a name="194665841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194665841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194665841">(Apr 20 2020 at 12:12)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/blob/bddf6b5266997dd7e017fcb963e54a86b68afbaa/crates/ra_ide/src/typing/on_enter.rs#L16" title="https://github.com/rust-analyzer/rust-analyzer/blob/bddf6b5266997dd7e017fcb963e54a86b68afbaa/crates/ra_ide/src/typing/on_enter.rs#L16">https://github.com/rust-analyzer/rust-analyzer/blob/bddf6b5266997dd7e017fcb963e54a86b68afbaa/crates/ra_ide/src/typing/on_enter.rs#L16</a></p>



<a name="194666176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194666176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194666176">(Apr 20 2020 at 12:16)</a>:</h4>
<p>You should be able to disable the keybinding in <code>Preferences: Open Keyboard Shortcuts</code>. The binding is called <code>rust-analyzer.onEnter</code>. You need to right click to remove it.</p>



<a name="194668334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194668334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194668334">(Apr 20 2020 at 12:38)</a>:</h4>
<p>alright then</p>



<a name="194668338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Enter%20key%20in%20VS%20Code/near/194668338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Enter.20key.20in.20VS.20Code.html#194668338">(Apr 20 2020 at 12:38)</a>:</h4>
<p>thanks</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>